import Vue from 'vue'
import VueRouter from 'vue-router'
import buttomNav from '../views/buttomNav.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'buttomNav',
    component: buttomNav,
    redirect:'/Home',
    children:[
      {
        path: 'Home',
        name: 'Home',
        component: () => import('../views/Home.vue')
      }, {
        path: 'About',
        name: 'About',
        component: () => import('../views/About.vue')
      }, {
        path: 'My',
        name: 'My',
        component: () => import('../views/My.vue')
      }, {
        path: 'Type',
        name: 'Type',
        component: () => import('../views/Type.vue')
      },
    ]
  },
  {
    path: '/search',
    name: 'search',
    component: () => import('../views/search.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
